package com.design.责任链模式;

public abstract class GateWayHandler {

	protected GateWayHandler nextGateWayHandler;
	
	public abstract void serive();
	
	public void setNextGateWayHandler(GateWayHandler nextGateWayHandler) {
		this.nextGateWayHandler = nextGateWayHandler;
	}
	
	public void execNextHand() {
		if(this.nextGateWayHandler != null) {
			nextGateWayHandler.serive();
		}
	}
	
	
	
}
